﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace Replace
{
    class Program
    {
        static void Main(string[] args)
        {
            string patern = @"<a href=(?<urll>[^>]+)>(?<urlls>[^<]*)</a>";
            string usedPattern = @"[url href=${urll}]${urlls}[/url]";
            string text = "asgfasgf <a href=dgsd>sagajkgajs</a>gasgsgh agba <a href=gsfdgkl>kkkkk</a>";
            string newText = Regex.Replace(text, patern, usedPattern);
            Console.WriteLine(newText);
        }
    }
}
